/**
 @file ctc_const.h

 @date 2009-10-27

 @version v2.0

The file define  all CTC SDK module's  common Macros and constant.
*/

#ifndef _CTC_CONST_H
#define _CTC_CONST_H
#ifdef __cplusplus
extern "C" {
#endif
#include "common/../../sal/include/sal_types.h"
#include "common/include/ctc_mix.h"
/****************************************************************
 *
 * Header Files
 *
 ***************************************************************/
#include "common/include/ctc_macro.h"

/****************************************************************
*
* Defines and Macros
*
****************************************************************/
/**
 @defgroup const    CONST
 @{
*/

/***************************Gport construct******************************************
 *   |-----Type----|----------Resv----------|-lport ext-|----gchip---|----lport----|*
 *   |    31-28    |          27-18         |   17-15   |    14-08   |    07~00    |*
 *   |-------------|------------------------|-----------|------------|-------------|*
 ***********************************************************************************/

/***************************Mchan construct******************************************
 *   |-----Type----|---Resv---|----mchan----|-lport ext-|----gchip---|----lport----|*
 *   |    31-28    |   27-22  |    21-18    |   17-15   |    14-08   |    07~00    |*
 *   |-------------|----------|-------------|-----------|------------|-------------|*
 ***********************************************************************************/
#define CTC_CONST8                      8
#define CTC_CONST16                     16
#define CTC_CONST32                     32
#define CTC_CONST64                     64
#define CTC_CONST128                    128
#define CTC_CONST256                    256
#define CTC_CONST512                    512
#define CTC_CONST1024                   1024
#define CTC_CONST2048                   2048
#define CTC_CONST4096                   4096

#define CTC_ETH_ADDR_LEN                6           /**< Ethernet mac address length (unit: byte) */
#define CTC_IPV6_ADDR_LEN               4           /**< IPv6 address length (unit: byte) */

#define CTC_GCHIP_LENGTH                7           /**< Gchip id length(unit: bit) */
#define CTC_GCHIP_MASK                  0x7F        /**< Gchip id mask(unit: bit) */

#define CTC_LOCAL_PORT_LENGTH           8           /**< Local port id length(unit: bit) */
#define CTC_LOCAL_PORT_MASK             0xFF        /**< Local port mask */

#define CTC_MCAST_PROFILE_LENGTH        16          /**< Mcast Profile length(unit: bit) */
#define CTC_MCAST_PROFILE_MASK          0xFFFF      /**< Mcast Profile mask */

#define CTC_EXT_PORT_LENGTH             3           /**< Local port id ext length(unit: bit) */
#define CTC_EXT_PORT_MASK               7           /**< Local port ext bit mask */

#define CTC_MCHAN_LENGTH                4           /**< mchan id length(unit: bit) */
#define CTC_MCHAN_MASK                  0xF         /**< mchan id bit mask */

#define CTC_RSV_PORT_LENGTH             6           /**< Reserve port length(unit: bit) */
#define CTC_RSV_PORT_MASK               0x3F        /**< Reserve port bit mask */

#define CTC_TYPE_PORT_LENGTH             4           /**< Port type length(unit: bit) */
#define CTC_TYPE_PORT_MASK               0xF          /**< Port type bit mask */
#define CTC_TYPE_PORT_OFFSET  (CTC_GCHIP_LENGTH + CTC_LOCAL_PORT_LENGTH + CTC_EXT_PORT_LENGTH + CTC_MCHAN_LENGTH + CTC_RSV_PORT_LENGTH)  /**< Port type bit offset */

#define CTC_MAC_NUM_PER_MACRO           8           /**< Mac number per macro */
#define CTC_LINKAGG_CHIPID              0x1F        /**< Linkagg port's global chip ID */
#define CTC_INVALID_CHIPID              0x3FFF      /**< Invalid chip id */
#define CTC_SDK_VERSION_STR "V5.7.2RC"
#define CTC_SDK_RELEASE_DATE "2023-12-25"
#define CTC_SDK_COPYRIGHT_TIME "2023"

/* no need any more in GB linkagg */
#define CTC_MAX_LINKAGG_MEMBER_PORT     16          /**< static load balance group_num:128,mem_num per group:8 */
#define CTC_MAX_VLAN_ID                 4095        /**< Max vlan id */
#define CTC_MIN_VLAN_ID                 1           /**< Min vlan id */
#define CTC_MAX_COS                     8           /**< Max cos*/
#define CTC_MIN_COS                     0           /**< Min cos*/
#define CTC_MAX_FID_ID(lchip)           (DRV_FROM_TMM(lchip)? 32767: 16383)       /**< Max fid id */
#define CTC_MIN_FID_ID                  0           /**< Min fid id */
#define CTC_MAX_LOGIC_PORT_ID           8191        /**< Max logic port id */
#define CTC_MIN_VRFID_ID                0           /**< Min vrfid id */
#define CTC_MAX_MTU_SIZE                0x3FFF      /**< Max MTU size */
#define BITS_NUM_OF_BYTE                8           /**< Bits num of byte */
#define BITS_NUM_OF_WORD                32          /**< Bits num of word */
#define BITS_SHIFT_OF_WORD              5           /**< Bits shift of word */
#define BITS_MASK_OF_WORD               0x1F        /**< Bits mask of word */

#define CTC_UINT64_BITS                 64
#define CTC_UINT32_BITS                 32
#define CTC_UINT16_BITS                 16
#define CTC_UINT8_BITS                  8

#define CTC_MAX_UINT16_VALUE            0xFFFF      /**< Max unsigned 16bit value */
#define CTC_MAX_UINT32_VALUE            0xFFFFFFFF  /**< Max unsigned 32bit value */
#define CTC_MAX_UINT8_VALUE             0xFF        /**< Max unsigned 8bit value */
#define CTC_PORT_BITMAP_IN_WORD         ((MAX_PORT_NUM_PER_CHIP + CTC_UINT32_BITS -1 ) / CTC_UINT32_BITS)     /**< port bitmap */
#define CTC_ACL_PORT_BITMAP_IN_BYTE     ((CTC_ACL_PORT_BITMAP_MAX_NUM + 7) / BITS_NUM_OF_BYTE)
#define CTC_ACL_PBR_CLASSID_MAX         63          /**< Max pbr classid*/
#define CTC_IPV6_ADDR_LEN_IN_BYTE       16          /**< IPv6 address length in byte */
#define CTC_IPV4_ADDR_LEN_IN_BYTE       4           /**< IPv4 address length in byte */
#define CTC_IPV6_ADDR_LEN_IN_BIT        128         /**< IPv6 address length in bit */
#define CTC_IPV4_ADDR_LEN_IN_BIT        32          /**< IPv4 address length in bit */

#define CTC_MAX_IPV4_VRFID              65534       /**< Max IPv4 vrfid */
#define CTC_MAX_IPV6_VRFID              4094        /**< Max IPv6 vrfid */

#define CTC_IPV6_ADDR_STR_LEN           44          /**< IPv6 address string length */

#define CTC_INVLD_NH_ID                 0xFFFFFFFF  /**< Invalid nexthop Id */
#define CTC_MPLS_SPACE_NUMBER           256         /**< Mpls space number */
#define CTC_MPLS_LABEL_NUM_PROCESS      3           /**< Mpls label num */
#define CTC_MPLS_OUT_SQE_NUM            64          /**< Mpls out sqe num */
#define CTC_MAX_ACL_CID                 255          /**< Max acl cid */
#define CTC_ACL_UNKNOWN_CID              255          /**< unkown acl cid, parsered cid > 255 will be classified to unkown CID */
#define CTC_ACL_DEFAULT_CID             0            /**< default CID */
#define CTC_MAX_QOS_DSCP_DOMAIN         15          /**< Max qos dscp domain */
#define CTC_MAX_QOS_DSCP_VALUE          63          /**< Max qos dscp value */

#define CTC_MAC_LEARN_USE_LOGIC_PORT    0x00000002  /**< Learning use logic-port per fid*/

#define CTC_DEFAULT_IPG                 0x14        /**< Default ipg */
#define CTC_MAX_CHIP_NUM                32
#define CTC_MAX_ACL_LKUP_NUM            24
#define CTC_MAX_SCL_LKUP_NUM            4

extern uint8 g_ctcs_map_lchip[CTC_MAX_LOCAL_DEV_NUM];
extern uint8 g_ctcs_map_ldev[CTC_MAX_LOCAL_CHIP_NUM_PP];
extern uint8 g_ctcs_map_lchip_base[CTC_MAX_LOCAL_CHIP_NUM_PP];
extern uint8 g_ctcs_map_pp_num[CTC_MAX_LOCAL_DEV_NUM];
#define CTC_MAP_LCHIP(ldev)    (ldev < CTC_MAX_LOCAL_DEV_NUM ? g_ctcs_map_lchip[(ldev)] : 0)
#define CTC_MAP_LDEV(lchip)    (lchip < CTC_MAX_LOCAL_CHIP_NUM_PP ? g_ctcs_map_ldev[(lchip)] : 0)
#define CTC_MAP_LCHIP_BASE(lchip)    (lchip < CTC_MAX_LOCAL_CHIP_NUM_PP ? g_ctcs_map_lchip_base[(lchip)] : 0)
#define CTC_MAP_LDEV_PP_NUM(ldev)    (ldev < CTC_MAX_LOCAL_DEV_NUM ? g_ctcs_map_pp_num[(ldev)] : 0)

/**
 @brief define port bitmap
*/
typedef uint32 ctc_port_bitmap_t[CTC_PORT_BITMAP_IN_WORD];

/**
 @brief define direction
*/
enum ctc_direction_e
{
    CTC_INGRESS,        /**< [GB.GG.D2.TM.TMM.TMA.AT] Ingress direction */
    CTC_EGRESS,         /**< [GB.GG.D2.TM.TMM.TMA.AT] Egress direction */
    CTC_BOTH_DIRECTION  /**< [GB.GG.D2.TM.TMM.TMA.AT] Both Ingress and Egress direction */
};
typedef enum ctc_direction_e ctc_direction_t;

/**
 @brief define scl location
*/
enum ctc_scl_location_e
{
    CTC_SCL_LOCATION_HASH   = 0,       /**< [GG] add entry to hash */
    CTC_SCL_LOCATION_TCAM0  = 1,       /**< [GG] add entry to tcam 0 */
    CTC_SCL_LOCATION_TCAM1  = 2,       /**< [GG] add entry to tcam 1 */
    CTC_SCL_LOCATION_MAX
};
typedef enum ctc_scl_location_e ctc_scl_location_t;

/**
 @brief define ip fragment
*/
enum ctc_ip_frag_e
{
    CTC_IP_FRAG_NON,              /**< [GB.GG.D2.TM.TMM.TMA.AT] Non fragmented*/
    CTC_IP_FRAG_FIRST,            /**< [GB.GG.D2.TM.TMM.TMA.AT] Fragmented and first fragment*/
    CTC_IP_FRAG_NON_OR_FIRST,     /**< [GB.GG.D2.TM.TMM.TMA.AT] Non fragmented OR Fragmented and first fragment*/
    CTC_IP_FRAG_SMALL,            /**< [GB.GG.D2.TM.TMM.AT] Small fragment */
    CTC_IP_FRAG_NOT_FIRST,        /**< [GB.GG.D2.TM.TMM.TMA.AT] Not first fragment (Fragmented of cause) */
    CTC_IP_FRAG_YES,              /**< [GG.D2.TM.TMM.TMA.AT] Any Fragmented */
    CTC_IP_FRAG_MAX
};
typedef enum ctc_ip_frag_e ctc_ip_frag_t;

/**
 @brief define acl enable
*/
enum ctc_acl_en_e
{
    CTC_ACL_DIS  = 0,       /**< [GB.GG.D2] acl disable */
    CTC_ACL_EN_0 = 0x1,     /**< [GB.GG.D2] acl0 enable */
    CTC_ACL_EN_1 = 0x2,     /**< [GB.GG.D2] acl1 enable */
    CTC_ACL_EN_2 = 0x4,     /**< [GB.GG.D2] acl2 enable */
    CTC_ACL_EN_3 = 0x8      /**< [GB.GG.D2] acl3 enable */
};
typedef enum ctc_acl_en_e ctc_acl_en_t;

/**
 @brief define acl ipv6 enable
*/
enum ctc_acl_ipv6_en_e
{
    CTC_ACL_IPV6_DIS  = 0,      /**< [GB] acl  ipv6 disable */
    CTC_ACL_IPV6_EN_0 = 0x1,    /**< [GB] acl0 ipv6 enable */
    CTC_ACL_IPV6_EN_1 = 0x2     /**< [GB] acl1 ipv6 enable */
};
typedef enum ctc_acl_ipv6_en_e ctc_acl_ipv6_en_t;

/**
 @brief define acl hash lookup type
*/
enum ctc_acl_hash_lkup_type_e
{
    CTC_ACL_HASH_LKUP_TYPE_DISABLE  = 0,        /**< [GG.D2.TM.TMM.AT] Hash Lookup disable */
    CTC_ACL_HASH_LKUP_TYPE_L2       = 1,        /**< [GG.D2.TM.TMM.AT] Hash Lookup matching L2 fields */
    CTC_ACL_HASH_LKUP_TYPE_L3       = 2,        /**< [GG.D2.TM.TMM.AT] Hash Lookup matching L3 fields */
    CTC_ACL_HASH_LKUP_TYPE_L2_L3    = 3,        /**< [GG.D2.TM.TMM.AT] Hash Lookup matching L2 + L3 fields */
    CTC_ACL_HASH_LKUP_TYPE_NSH      = 5,        /**< [AT] Hash Lookup matching NSH fields */
    CTC_ACL_HASH_LKUP_TYPE_MAX
};
typedef enum ctc_acl_hash_lkup_type_e ctc_acl_hash_lkup_type_t;

/**
 @brief define acl tcam lookup type
*/
enum ctc_acl_tcam_lkup_type_e
{
    CTC_ACL_TCAM_LKUP_TYPE_L2           = 0,    /**< [GG.D2.TM.TMM.AT] Tcam Lookup matching L2 fields */
    CTC_ACL_TCAM_LKUP_TYPE_L2_L3        = 1,    /**< [GG.D2.TM.TMM.AT] Tcam Lookup matching L2 + L3 fields */
    CTC_ACL_TCAM_LKUP_TYPE_L3           = 2,    /**< [GG.D2.TM.TMM.AT] Tcam Lookup matching L3 fields */
    CTC_ACL_TCAM_LKUP_TYPE_VLAN         = 3,    /**< [GG] Tcam Lookup matching L2 fields with double vlan */
    CTC_ACL_TCAM_LKUP_TYPE_L3_EXT       = 4,    /**< [D2.TM.TMM.AT] Tcam Lookup matching abundant L3 fields */
    CTC_ACL_TCAM_LKUP_TYPE_L2_L3_EXT    = 5,    /**< [D2.TM.TMM.AT] Tcam Lookup matching abundant L2 + L3 fields */
    CTC_ACL_TCAM_LKUP_TYPE_CID          = 6,    /**< [D2.TM.TMM.AT] Tcam Lookup matching category id */
    CTC_ACL_TCAM_LKUP_TYPE_INTERFACE    = 7,    /**< [D2.TM.TMM.AT] Tcam Lookup matching interface */
    CTC_ACL_TCAM_LKUP_TYPE_FORWARD      = 8,    /**< [D2.TM.TMM.AT] Tcam Lookup matching forwarding infomation */
    CTC_ACL_TCAM_LKUP_TYPE_FORWARD_EXT  = 9,    /**< [D2.TM.TMM.AT] Tcam Lookup matching abundant forwarding infomation */
    CTC_ACL_TCAM_LKUP_TYPE_COPP         = 10,   /**< [D2.TM.TMM.AT] Tcam Lookup for copp */
    CTC_ACL_TCAM_LKUP_TYPE_UDF          = 11,   /**< [TM.TMM.AT] Tcam Lookup for udf */
    CTC_ACL_TCAM_LKUP_TYPE_STK_HDR      = 12,   /**< [TMM.AT] Tcam Lookup for stacking header */
    CTC_ACL_TCAM_LKUP_TYPE_MAX
};
typedef enum ctc_acl_tcam_lkup_type_e ctc_acl_tcam_lkup_type_t;


/**
 @brief define ip version
*/
enum ctc_ip_ver_e
{
    CTC_IP_VER_4,   /**< [GB.GG.D2.TM.TMM.AT] IP version 4 */
    CTC_IP_VER_6,   /**< [GB.GG.D2.TM.TMM.AT] IP version 6 */
    MAX_CTC_IP_VER
};
typedef enum ctc_ip_ver_e ctc_ip_ver_t;

/**
 @brief  Define mpls tunnel mode
*/
enum ctc_mpls_tunnel_mode_e
{
    CTC_MPLS_TUNNEL_MODE_UNIFORM,      /**< [GB.GG.D2.TM.TMM.AT] The Tunnel mode of this label is uniform */
    CTC_MPLS_TUNNEL_MODE_SHORT_PIPE,   /**< [GB.GG.D2.TM.TMM.AT] The Tunnel mode of this label is short pipe */
    CTC_MPLS_TUNNEL_MODE_PIPE,         /**< [GB.GG.D2.TM.TMM.AT] The Tunnel mode of this label is pipe */
    CTC_MPLS_MAX_TUNNEL_MODE
};
typedef enum ctc_mpls_tunnel_mode_e ctc_mpls_tunnel_mode_t;

/**
 @brief define metadata type
*/
enum ctc_metadata_type_e
{
    CTC_METADATA_TYPE_INVALID,       /**< [GG.D2.TM.TMM.AT] metadata is invalid */
    CTC_METADATA_TYPE_METADATA,      /**< [GG.D2.TM.TMM.AT] metadata is storing metadata */
    CTC_METADATA_TYPE_FID,           /**< [GG.D2.TM.TMM.AT] metadata is storing fid*/
    CTC_METADATA_TYPE_VRFID,         /**< [GG.D2.TM.TMM.AT] metadata is storing vrfid */
    CTC_METADATA_TYPE_MAX
};
typedef enum ctc_metadata_type_e ctc_metadata_type_t;


/**
 @brief define metadata type
*/
enum ctc_pkt_offset_type_e
{
    CTC_PKT_OFFSET_NONE, /**< [TMM.AT] none */
    CTC_PKT_OFFSET_L2,   /**< [TMM.AT] start of L2 header*/
    CTC_PKT_OFFSET_L3,   /**< [TMM.AT] start of L3 header*/
    CTC_PKT_OFFSET_L4,   /**< [TMM.AT] start of L4 header*/
    CTC_PKT_OFFSET_MAX
};
typedef enum ctc_pkt_offset_type_e ctc_pkt_offset_type_t;

/**
 @brief define drop reason
 Direction     : I-ingress, E-egress, B-both direction, - Not care direction
*/
enum ctc_drop_reason_e
{
    CTC_DROP_NONE                   , /** [TM.TMM.AT] [-] None drop                       */
    CTC_DROP_LPBK_ERR               , /** [TM.TMM.AT] [B] Loopback error                  */
    CTC_DROP_PARSER_ERR             , /** [TM.TMM.AT] [B] Parser error                    */
    CTC_DROP_EXCP                   , /** [TM.TMM.AT] [I] Exception config                */
    CTC_DROP_TRANSIT_DISABLE        , /** [TM.TMM.AT] [E] Transit disable                 */
    CTC_DROP_RECEIVE_DISABLE        , /** [TM.TMM.AT] [I] Receive disable                 */
    CTC_DROP_FWD_ERR                , /** [TM.TMM.AT] [B] Destination check fail          */
    CTC_DROP_VLAN_FILTER            , /** [TM.TMM.AT] [B] Vlan filtering                  */
    CTC_DROP_IP_CHK                 , /** [TM.TMM.AT] [B] Ip address or packet check fail */
    CTC_DROP_STP_CHK                , /** [TM.TMM.AT] [B] Stp check fail                  */
    CTC_DROP_POLICING               , /** [TM.TMM.AT] [B] Exceed policer threshold        */
    CTC_DROP_SECURITY_CHK           , /** [TM.TMM.AT] [I] Security check fail             */
    CTC_DROP_PORT_MAC_CHK           , /** [TM.TMM.AT] [I] Port mac check fail             */
    CTC_DROP_ISOLATE_CHK            , /** [TM.TMM.AT] [B] Port isolate check fail         */
    CTC_DROP_PKT_ERR                , /** [TM.TMM.AT] [B] Packet check error              */
    CTC_DROP_HW_ERR                 , /** [TM.TMM.AT] [B] Hardware error                  */
    CTC_DROP_STK_CHK                , /** [TM.TMM.AT] [I] Stacking check fail             */
    CTC_DROP_BPE_PORT_ERR           , /** [TM.TMM.AT] [I] BPE port configure error        */
    CTC_DROP_IP_SRC_GUARD           , /** [TM.TMM.AT] [I] Ip source guard check fail      */
    CTC_DROP_LAG_EMPTY              , /** [TM.TMM.AT] [I] Linkagg group no member         */
    CTC_DROP_APS                    , /** [TM.TMM.AT] [I] APS                             */
    CTC_DROP_SCL_DENY               , /** [TM.TMM.AT] [B] Scl deny                        */
    CTC_DROP_ACL_DENY               , /** [TM.TMM.AT] [B] Acl deny                        */
    CTC_DROP_PTP                    , /** [TM.TMM.AT] [I] Ptp packet or config error      */
    CTC_DROP_OAM                    , /** [TM.TMM.AT] [B] Oam packet or config error      */
    CTC_DROP_DOT1AE                 , /** [TM.TMM.AT] [B] Dot1ae packet or config error   */
    CTC_DROP_MIMICRY                , /** [TM.TMM.AT] [I] Mimicry error                   */
    CTC_DROP_VPLS                   , /** [TM.TMM.AT] [E] Vpls packet or config error     */
    CTC_DROP_MIRROR                 , /** [TM.TMM.AT] [E] Mirror config error             */
    CTC_DROP_TRILL                  , /** [TM.TMM.AT] [I] Trill packet or config error    */
    CTC_DROP_BFD                    , /** [TM.TMM.AT] [E] Bfd packet or config error      */
    CTC_DROP_PON                    , /** [TM.TMM.AT] [E] PON error                       */
    CTC_DROP_ARP_OR_DHCP_ERR        , /** [TM.TMM.AT] [I] ARP or DHCP packet check fail   */
    CTC_DROP_ARP_MISS               , /** [TM.TMM.AT] [E] Arp miss                        */
    CTC_DROP_VXLAN_CHK              , /** [TM.TMM.AT] [I] Vxlan check fail                */
    CTC_DROP_TUNNEL_CHK             , /** [TM.TMM.AT] [I] Tunnel check fail               */
    CTC_DROP_ICMP_ERR               , /** [TM.TMM.AT] [B] Icmp packet or congfig error    */
    CTC_DROP_TTL_CHK                , /** [TM.TMM.AT] [B] TTL check fail                  */
    CTC_DROP_SD_CHK                 , /** [TM.TMM.AT] [B] Signal degradation              */
    CTC_DROP_MPLS_CHK               , /** [TM.TMM.AT] [I] Mpls check fail                 */
    CTC_DROP_MTU_CHK                , /** [TM.TMM.AT] [E] Mtu check fail                  */
    CTC_DROP_PLD_OP_ERR             , /** [TM.TMM.AT] [E] Packet payload operation error  */
    CTC_DROP_LATENCY                , /** [TM.TMM.AT] [E] Latency check fail              */
    CTC_DROP_EDIT_ERR               , /** [TM.TMM.AT] [E] Next hop edit error             */
    CTC_DROP_CHKSUM_ERR             , /** [TM.TMM.AT] [E] Checksum error                  */
    CTC_DROP_TRAFFIC_MANAGER        , /** [TM.TMM.AT] [-] Trafic manager check fail       */
    CTC_DROP_NET_TX                 , /** [TM.TMM.AT] [E] Nettx check fail                */
    CTC_DROP_NET_RX                 , /** [TM.TMM.AT] [I] Netrx check fail                */
    CTC_DROP_QUEUE                  , /** [TMM.AT] [E] Queue drop                         */
    CTC_DROP_BS                     , /** [TMM.AT] [-] Buffer store drop                     */
    CTC_DROP_OTHER                  , /** [TMM.AT] [-] Other drop                            */

    CTC_DROP_MAX

};
typedef enum ctc_drop_reason_e ctc_drop_reason_t;

enum ctc_qos_buffer_type_e
{
    CTC_QOS_BUFFER_NONE,            /**< [TMM.AT] None*/
    CTC_QOS_BUFFER_PORT_PRIO_CLASS, /**< [AT] Port priority class resource check*/
    CTC_QOS_BUFFER_QUEUE,           /**< [TMM.AT] Queue resource check*/
    CTC_QOS_BUFFER_PORT_SC,         /**< [AT] Port sc resource check*/
    CTC_QOS_BUFFER_PORT,            /**< [TMM.AT] Port resource check*/
    CTC_QOS_BUFFER_SC,              /**< [AT] SC resource check*/
    CTC_QOS_BUFFER_CONTROL,         /**< [AT] Critical packet resource check*/
    CTC_QOS_BUFFER_C2C,             /**< [AT] C2C packet resource check*/
    CTC_QOS_BUFFER_TOTAL,           /**< [AT] Total resource check*/
    CTC_QOS_BUFFER_MAX
};
typedef enum ctc_qos_buffer_type_e ctc_qos_buffer_type_t;

/**
 @brief define feature support
*/
enum ctc_feature_e
{
    CTC_FEATURE_PORT,             /**< [GB.GG.D2.TM.TMM.TMA.AT]         Port Configuration feature                            */
    CTC_FEATURE_VLAN,             /**< [GB.GG.D2.TM.TMM.TMA.AT]         Vlan Management feature                               */
    CTC_FEATURE_LINKAGG,          /**< [GB.GG.D2.TM.TMM.TMA.AT]         Link Aggregation feature                              */
    CTC_FEATURE_CHIP,             /**< [GB.GG.D2.TM.TMM.TMA.AT]         Chip Management feature                               */
    CTC_FEATURE_FTM,              /**< [GB.GG.D2.TM.TMM.AT]             Flexible Table Management feature                     */
    CTC_FEATURE_NEXTHOP,          /**< [GB.GG.D2.TM.TMM.AT]             Nexthop Management feature                            */
    CTC_FEATURE_L2,               /**< [GB.GG.D2.TM.TMM.TMA.AT]         Layer 2 Management feature                            */
    CTC_FEATURE_L3IF,             /**< [GB.GG.D2.TM.TMM.AT]             Layer 3 Interface feature                             */
    CTC_FEATURE_IPUC,             /**< [GB.GG.D2.TM.TMM.AT]             IP Unicast Management feature                         */
    CTC_FEATURE_IPMC,             /**< [GB.GG.D2.TM.TMM.TMA.AT]         Ip Multicast Management feature                       */
    CTC_FEATURE_IP_TUNNEL,        /**< [GB.GG.D2.TM.TMM.AT]             IP-tunnel feature                                     */
    CTC_FEATURE_SCL,              /**< [GB.GG.D2.TM.TMM.AT]             Service Access Control List feature                   */
    CTC_FEATURE_ACL,              /**< [GB.GG.D2.TM.TMM.TMA.AT]         Access Control List feature                           */
    CTC_FEATURE_QOS,              /**< [GB.GG.D2.TM.TMM.TMA.AT]         Quality Of Service feature                            */
    CTC_FEATURE_SECURITY,         /**< [GB.GG.D2.TM.TMM.TMA.AT]         Security feature                                      */
    CTC_FEATURE_STATS,            /**< [GB.GG.D2.TM.TMM.TMA.AT]         Statistics feature                                    */
    CTC_FEATURE_MPLS,             /**< [GB.GG.D2.TM.TMM.AT]             MPLS Management feature                               */
    CTC_FEATURE_OAM,              /**< [GB.GG.D2.TM.TMM.AT]             Operations, Administration, and Maintenance feature   */
    CTC_FEATURE_APS,              /**< [GB.GG.D2.TM.TMM.AT]             Automatic Protection Switching feature                */
    CTC_FEATURE_PTP,              /**< [GB.GG.D2.TM.TMM.AT]             Precision Time Protocol feature                       */
    CTC_FEATURE_DMA,              /**< [GB.GG.D2.TM.TMM.AT]             Direct Memory Access feature                          */
    CTC_FEATURE_INTERRUPT,        /**< [GB.GG.D2.TM.TMM.TMA.AT]         Interrupt feature                                     */
    CTC_FEATURE_PACKET,           /**< [GB.GG.D2.TM.TMM.TMA.AT]         Packet Management feature                             */
    CTC_FEATURE_PDU,              /**< [GB.GG.D2.TM.TMM.TMA.AT]         Protocol Data Unit Management feature                 */
    CTC_FEATURE_MIRROR,           /**< [GB.GG.D2.TM.TMM.TMA.AT]         Mirroring feature                                     */
    CTC_FEATURE_BPE,              /**< [GB.GG.D2.TM.TMM.AT]             Bridge Port Extension feature                         */
    CTC_FEATURE_STACKING,         /**< [GB.GG.D2.TM.TMM.AT]             Stacking feature                                      */
    CTC_FEATURE_OVERLAY,          /**< [GG.D2.TM.TMM.AT]                NvGRE and VxLAN Overlay Tunnel feature                */
    CTC_FEATURE_IPFIX,            /**< [GG.D2.TM.TMM.AT]                IP Flow Information Management feature                */
    CTC_FEATURE_EFD,              /**< [GG.D2.TM.TMM.AT]                Elephant Flow Detect feature                          */
    CTC_FEATURE_MONITOR,          /**< [GG.D2.TM.TMM.AT]                Buffer and Latency Monitor feature                    */
    CTC_FEATURE_FCOE,             /**< [GG.D2.TM.TMM.AT]                Fibre Channel over Ethernet feature                   */
    CTC_FEATURE_TRILL,            /**< [GG.D2.TM.TMM.AT]                Transparent Interconnection of Lots of Links feature  */
    CTC_FEATURE_WLAN,             /**< [D2.TM]                          Wireless Local Area Networks feature                  */
    CTC_FEATURE_NPM,              /**< [D2.TM.TMM.AT]                   Networks Performance Metrics feature                  */
    CTC_FEATURE_VLAN_MAPPING,     /**< [GB.GG.D2.TM.TMM.TMA.AT]         Vlan Mapping feature                                  */ 
    CTC_FEATURE_DOT1AE,           /**< [D2.TM.TMM.AT]                   Dot1ae feature                                        */
    CTC_FEATURE_SRV6,             /**< [TMM.AT]                         Segment Routing of IPv6 feature                       */
    CTC_FEATURE_DTEL,             /**< [TMM.AT]                         Data Plane Telemetry feature                          */
    CTC_FEATURE_DIAG,             /**< [TM.TMM.AT]                      Diagnosis feature                                     */
    CTC_FEATURE_SC_OAM,           /**< [TMM]                            SPN Channel OAM feature                               */
    CTC_FEATURE_SYNC_ETHER,       /**< [GB.GG.D2.TM.TMM.TMA.AT]         Synchronous Ethernet feature                          */
    CTC_FEATURE_APP_VLAN_PORT,    /**< [GB.D2]                       XGPON feature                                         */
    CTC_FEATURE_DATAPATH,         /**< [GB.GG.D2.TM.TMM.TMA.AT]         Datapath feature                                      */
    CTC_FEATURE_REGISTER,         /**< [GB.GG.D2.TM.TMM.TMA.AT]         Register feature                                      */
    CTC_FEATURE_FLEXE,            /**< [TMM]                            Flex Ethernet feature                                 */
    CTC_FEATURE_PON,              /**< [TM.TMM.AT]                         PON feature                                           */
    CTC_FEATURE_XDATA,            /**< [AT]                             Xdata feature                                         */

    CTC_FEATURE_MAX
};
typedef enum ctc_feature_e ctc_feature_t;

/**@} end of @desfgroup  const CONST */

#ifdef __cplusplus
}
#endif

#endif /* _CTC_CONST_H*/

